Learn R Programming

Directional (version 4.0)

Prediction in discriminant analysis based on von Mises-Fisher distribution: Prediction of a new observation using discriminant analysis based on von Mises-Fisher distribution

Description

Prediction of the class of a new observation using discriminant analysis based on von Mises-Fisher distribution.

Usage

vmfda.pred(xnew, x, ina)

Arguments

xnew

The new observation(s) (unit vector(s)) whose group is to be predicted.

x

A data matrix with unit vectors, i.e. directional data.

ina

A vector indicating the groups of the data x.

Value

A vector with the predicted group of each new observation.

Details

Discriminant analysis assuming von Mises-Fisher distributions.

References

Morris J. E. & Laycock P. J. (1974). Discriminant analysis of directional data. Biometrika, 61(2): 335-341.

See Also

vmf.da, mix.vmf, mix.vmf, dirknn, knn.reg

Examples

Run this code
# NOT RUN {
m1 <- rnorm(5)
m2 <- rnorm(5)
x <- rbind( rvmf(100, m1, 5), rvmf(80, m2, 10) )
ina <- c( rep(1,100), rep(2, 80) )
y <- rbind(rvmf(10, m1, 10), rvmf(10, m2, 5))
id <- rep(1:2, each = 10)
g <- vmfda.pred(y, x, ina)
table(id, g)
# }

Run the code above in your browser using DataLab